const login=require("./login")
const common=require("./common")
module.exports = {
  data: {
    openId: '',
  },
  openId(openId) {
      this.setData({
        openId:openId
      });
  },
  onLoad:async function (){
    login.getOpenId().then(res=>{
      this.openId(res.openId)
    },err=>{
      console.error(err)
      common.showErrorMsg({errorCode:-1,errorMsg:err.errorMsg})
    })
  }
};